#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author:Zhangcl
import pika
import re
import random
a = 'run "df -h" --hosts 192.168.3.55'
pattern = re.compile('"(.*)"')
cmd ="".join(pattern.findall(a))
print(cmd)
print(type(cmd))
ip = re.findall(r'\d+.\d+.\d+.\d+',a)
for x in ip:
    print(x)
    print(type(x))
print(ip)
print(type(ip))
for i in ip:
    print(i)
b = 'check_task 45334'
print(b.split())
b_list = b.split()
b_ip = b_list[-1]
print(b_list,b_ip)

guess = ''.join([str(i) for i in random.sample(range(0, 9), 5)])
print(guess)